<template>
   <div id="messagePage" class="view">
     <div class="sec1">时时彩</div>
     <div class="sec2">
       <el-table :data="tableData" style="width: 100%">
         <el-table-column prop="type" label="彩种" width="90">
         </el-table-column>
         <el-table-column prop="qinum" label="期号" width="80">
         </el-table-column>
         <el-table-column prop="date" label="开奖时间" width="160">
         </el-table-column>
         <el-table-column  label="开奖号码"  >
             <template slot-scope="scope">
               <span v-for="(item, index) in scope.row.number">
                 <span class="round bgRed" >{{item}}</span>
                 <!--<i v-if="index < scope.row.number.length - 2" style="text-align: center">+</i>-->
                 <!--<i v-if="index === scope.row.number.length - 2" style="text-align: center">=</i>-->
               </span>
             </template>
         </el-table-column>
         <el-table-column prop="title" label="投注提示" width="130">
         </el-table-column>
         <el-table-column prop="times" label="开奖频率" width="80">
         </el-table-column>
         <el-table-column  label="详情" width="70">
           <template slot-scope="scope">
             <el-button type="text" size="mini" @click="goZoushi()">详情</el-button>
           </template>
         </el-table-column>
         <el-table-column  label="走势" width="70">
           <template slot-scope="scope">
             <el-button type="text" size="mini" @click="goZoushi()">走势</el-button>
           </template>
         </el-table-column>
         <el-table-column  label="购买" width="100">
           <template slot-scope="scope">
             <el-button type="primary" size="mini" @click="goTouzhu(scope.row.path)">我要投注</el-button>
           </template>
         </el-table-column>
       </el-table>
     </div>
   </div>
</template>

<script>
  export default {
    data () {
      return {
        tableData: [
          {
            type: '三分时时彩',
            qinum: '213131',
            date: '2017-10-28 14:25',
            number: [5, 8, 9, 22],
            title: '每天开奖24545期',
            times: '2分',
            path: '/hall/sfshishi'
          },
          {
            type: '上海11选5',
            qinum: '213131',
            date: '2017-10-28 14:25',
            number: '85543',
            title: '每天开奖24545期',
            times: '2分',
            path: '/hall/sh11x5'
          },
          {
            type: '重庆时时彩',
            qinum: '213131',
            date: '2017-10-28 14:25',
            number: '855',
            title: '每天开奖24545期',
            times: '2分',
            path: '/hall/cqshishi'
          },
          {
            type: '北京PK拾',
            qinum: '213131',
            date: '2017-10-28 14:25',
            number: '855',
            title: '每天开奖24545期',
            times: '2分',
            path: '/hall/pk10'
          }
        ]
      }
    },
    methods: {
      goTouzhu (path) {
        this.$router.push(path)
      },
      goZoushi () {
        this.$router.push('/charts')
      }
    }

  }
</script>

<style lang="less">
#messagePage{
  padding-top: 20px;
  tr td:nth-child(4){
    text-align: left;
  }
  .sec1{
    line-height:50px;
    font-size: 17px;
    border:1px solid #ccc;
    font-weight: 500;
    text-align: left;
    padding-left: 20px;
    color: #000;
    border-bottom: 4px solid #e4393c;
  }
  .sec2{
    border:1px solid #ccc;
  }
  .bgRed{
    background-color: #e4393c;
    color: white;
    margin-right: 5px;

  }
}
</style>
